<template>
  <div id="app">
       <NavBar></NavBar>
      <SlideMenu @sendCidFromSub="getCid"></SlideMenu>
      <Books ref="books"></Books>
  </div>
</template>

<script>

  import NavBar from "@/components/NavBar";
  import SlideMenu from "@/components/SlideMenu";
  import Books from "@/components/Books";
  export default {
      components: {NavBar,SlideMenu,Books},
      data(){
          return{
              cid:0
          }
      },
      methods:{
          getCid(id){
              this.cid = id
              // alert("父组件获取的子组件的类型编号："+id)
              this.$refs.books.cid = id;
          }
      }
  }

</script>

<style>

</style>
